<?php
defined('BASEPATH') OR exit('No direct script access allowed');
?><!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title>我的电商系统</title>
	<base href="http://localhost/shop/" />
	<link rel="stylesheet" type="text/css" href="public/css/bootstrap.min.css">
	<link rel="stylesheet" type="public/css/bootstrap-theme.min.css">
	 <link rel="stylesheet" href="public/nivo/nivo-slider.css" type="text/css" media="screen" />
	 <link rel="stylesheet" type="text/css" href="public/css/front.css">
</head>
	<div class="container front">
<!--head-->	
		<?php $this->load->view('header') ?>
<!--banner-->
		<div class="row" id="banner">
			<div class="col-md-3 ">
				<div class="list-group">
				  <a href="#" class="list-group-item  first"><i class="glyphicon glyphicon-align-justify"></i>
				    所有分类
				  </a>
				  <?php foreach ($prodect_catalog as $p) {
				  ?>
				  	 <a href="<?php echo  site_url('prodect/lists/'.$p->id) ?>" class="list-group-item"><?php echo $p->name ?></a>
				<?php
				  } ?>
				 
				</div>
			</div>
			<div class="col-md-9">
    			<div id="slider" class="nivoSlider">
        		<img src="<?=base_url()?>public/img/slider1.jpg" alt="" />
        		<img src="<?=base_url()?>public/img/slider2.jpg" alt="" />
        		<img src="<?=base_url()?>public/img/slider3.jpg" alt="" />
        		<img src="<?=base_url()?>public/img/slider4.jpg" alt="" />	
    			</div>
			</div>	
		</div>
<!--main-->
		<div class="row">
			<div class="col-md-8 ">
				<?php foreach ($prodect as $p) {
				?>
					<div class="item clearfix">
						<img src="<?php echo  base_url($p->img)  ;?>">
						<a href="<?=site_url('prodect/detail/'.$p->id) ?>"><h1 ><?php echo $p->title ;?></h1></a>
						<p><?php echo $p->desc; ?></p>
						<div id="price">¥ <?php echo number_format($p->price,2); ?></div>
						<a href="<?=site_url('prodect/detail/'.$p->id) ?>" class="btn btn-danger " id="buy">立即抢购</a>
					</div>
				<?php	
				} 
				?>	
			</div>
			<div class="col-md-4">
				<div id="ad"></div>
				<div id="lable">

				  <!-- Nav tabs -->
				  <ul class="nav nav-tabs nav-justified" role="tablist">
				    <li role="presentation" class="active"><a href="#notice"  data-toggle="tab">公告</a></li>
				    <li role="presentation"><a href="#news" " data-toggle="tab">新闻</a></li>
				  </ul>

				  <!-- Tab panes -->
				  <div class="tab-content">
				    <div role="tabpanel" class="tab-pane active" id="notice">
				    	<ul>
				    		<?php foreach ($notice as $n) {
				    		?>
				    			<li><a href="###"><?php echo $n->title ?></a></li>
				    		<?php
				    		} ?>
				    	</ul>
				    </div>
				    <div role="tabpanel" class="tab-pane" id="news">
						<ul>
							<?php foreach ($news as $news) {
				    		?>
				    			<li><a href="###"><?php echo $news->title ?></a></li>
				    		<?php
				    		} ?>
				    	</ul>
				    </div>
				  </div>

				</div>
			</div>
		</div>
	
		<div class="row">
			<div class="col-md-12">
				<div class="first">
					<?php
						$i=1; 
						$catalog_id=array(12,123,191);
						foreach ($catalog_id as $ci) {
							$goods=$this->Prodect_model->get_by_catalog_id($ci);
							$recommend=$this->Prodect_model->get_by_recommend($ci);
							$pc=$this->Prodect_catalog_model->get_one_pc($ci);
						?>	
					<div><span><?php echo $i ?>f</span><?php echo $pc->name ?></div>
					<br/>
					<div class="main clearfix">
						<div class="left clearfix">
						
							<img src="<?php echo base_url($recommend->img) ?>" id="img">
							<h4><?php echo $recommend->title ?></h4>
							<p id="p"><?php echo $recommend->desc ?></p>
							<div class="price">￥<?php echo number_format($recommend->price,2) ?></div>
							<a class="btn btn-danger " id="buy">立即抢购</a>
						</div>
						<?php foreach ($goods as $g) {
					?>
						<div class="it">
							<img src="<?php echo base_url($g->img) ?>" id="image">
							<div class="title"><?php echo $g->title ?></div>
							<div class="price">￥<?php echo number_format($g->price,2) ?></div>
						</div>
						<?php
						}
						?>
					</div>
						<br/>
					<?php 
					$i++;		
					}
					?>
				</div>
			</div>
		</div>
		<br/>
		<hr/>
		<div class="row">
			<div class="foot">
				<ul>
					<li><a href="">帮助中心</a></li>
					<li><a href="">购物指南</a></li>
					<li><a href="">配送方式</a></li>
					<li><a href="">支付方式</a></li>
				</ul>
			</div>
			<div class="foot">
				<ul>
					<li><a href="">技术支持</a></li>
					<li><a href="">售后网店</a></li>
					<li><a href="">常见问题</a></li>
				</ul>
			</div>
			<div class="foot">
				<ul>
					<li><a href="">关于商城</a></li>
					<li><a href="">公司介绍</a></li>
					<li><a href="">商城介绍</a></li>
					<li><a href="">联系客服</a></li>
				</ul>
			</div>
			<div class="foot">
				<ul>
					<li><a href="">关于我们</a></li>
					<li><a href="">商城手机版</a></li>
				</ul>
			</div>
			<div class="foot">
				<ul>
					<li><a href="">售后服务</a></li>
					<li><a href="">保修政策</a></li>
					<li><a href="">退换货政策</a></li>
					<li><a href="">退换货流程</li>
				</ul>
			</div>
		</div>
		<hr/>
		<div id="bottom">
			<p>未经goodjobs.cn同意，不得转载网站之所有招聘信息及作品 新安人才网版权所有&copy;2000-2016</p>
			<p>皖ICP备12018891号 经营许可证：皖B2-20080016</p>
		</div>		
	</div>


</body>

<script type="text/javascript" src="<?php echo base_url();?>public/js/jquery.min.js"></script>
<script type="text/javascript" src="<?=base_url()?>public/nivo/jquery.nivo.slider.js"></script>
<script type="text/javascript" src="<?php echo base_url();?>public/js/bootstrap.min.js"></script>

	<script type="text/javascript">
	    $(window).load(function() {
	        $('#slider').nivoSlider(
	        	{
	        		prevText: "<i class='glyphicon glyphicon-chevron-left'></i>",
	        		nextText:"<i class='glyphicon glyphicon-chevron-right'></i>" 
	        	});
	    });
	</script>
</html>